package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.product.BaseAttrInfo;
import com.atguigu.gmall.model.product.BaseSaleAttr;
import com.atguigu.gmall.product.service.BaseAttrInfoService;
import com.atguigu.gmall.product.service.BaseSaleAttrInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author dyqstart
 * @create 2021-08-05-17:41
 * @since 1.0.0
 */
@RestController
@RequestMapping("/admin/product")
public class BaseSaleAttrController {


    @Autowired
    BaseSaleAttrInfoService baseSaleAttrInfoService;

    @GetMapping("baseSaleAttrList")
    public Result<List<BaseSaleAttr>> baseSaleAttrList(){

        List<BaseSaleAttr> list = baseSaleAttrInfoService.list();

        return Result.ok(list);
    }


}
